*******************************************
** MARGARET E. PETERS and ADRIAN J. SHIN **
** INEQUALITY AND IMMIGRATION POLICY    ***
** May, 2022                            ***
*******************************************


use "Immigration Policy and Inequality May 2022.dta", clear

*Figure 1
twoway  (scatter immipol inequality, mcolor(gs12)) (lfit immipol inequality, lcolor(black)) , ////
graphregion(margin(small) fcolor(white) lcolor(white) )  legend(off)   ////
	xtitle("Inequality", size(6)) ytitle("Low-Skill Immigration Policy", size(6)) xlabel(,labsize(5)) ylabel(,labsize(5))
graph export "Graph_bivarate_immi_ineq.pdf", replace

*Figure 2
twoway (scatter immipol inequality, mcolor(gs12)) (lfit immipol inequality, lcolor(black)) if ln_gdp_pc<9, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(lowinc, replace)   ////
	xtitle("Inequality", size(6)) ytitle("Low-Skill Immigration Policy", size(6)) title("Middle Income", size(7)) yscale(range(-3 2))  ylabel(-3(1)2,labsize(5)) xlabel(,labsize(5))

	
twoway (scatter immipol inequality, mcolor(gs12)) (lfit immipol inequality, lcolor(black)) if ln_gdp_pc>9 & ln_gdp_pc<10, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(midinc, replace)   ////
	xtitle("Inequality", size(6)) ytitle("") title("High Income", size(7)) yscale(range(-3 2)) ylabel(-3(1)2,labsize(5)) xlabel(,labsize(5)) 

	twoway (scatter immipol inequality, mcolor(gs12)) (lfit immipol inequality, lcolor(black)) if ln_gdp_pc>10, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(highinc, replace)   ////
	xtitle("Inequality", size(6)) ytitle("") title("Very High Income", size(7)) yscale(range(-3 2)) ylabel(-3(1)2,labsize(5)) xlabel(,labsize(5)) 
	
graph combine lowinc midinc highinc, cols(3) graphregion(margin(small) fcolor(white) lcolor(white))	
graph export "Graph_bivariate_byinc.pdf", replace

*Table 2: Inequality, Development, and Immigration Policy since World War II 
*MODEL 1
qui xtpcse immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0
estimates store MODEL1, title(Wealth) 
*MODEL 2
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0
estimates store MODEL2, title(Education) 
*MODEL3
qui xtpcse immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode if regime==0
estimates store MODEL3, title(Wealth + Education Control)
*MODEL4
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode if regime==0
estimates store MODEL4, title(Education + Wealth Control)
*MODEL5
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality c.ln_gdp_pc#c.inequality ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0
estimates store MODEL5, title(Both Education and Wealth Interaction Terms)
estout MODEL1 MODEL2 MODEL3 MODEL4 MODEL5, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "table2.tex", replace style(tex)

*Figure 3 
*Marginal Effects of Inequality on Immigration Policy from Model 1 at Constant Values of ln(GDP per capita)
qui xtpcse immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth polity_2 i.year i.ccode if regime==0
qui margins, dydx(inequality) at(ln_gdp_pc=(7(.1)10.5))
marginsplot, xsize(5) ysize(6) addplot(hist ln_gdp_pc if regime==0 & year>1946 & year<2007, yaxis(2) yscale(axis(2) range(1.2 .4) off)lc(white%50) fcolor(gs10%50) xlabel(7(.5)10.5),) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Log of GDP per capita, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model1.pdf", replace

*Table 3: Inequality, Development, and Immigration Policy (1950--2006)
*MODEL 6
qui xtpcse immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & sstpy!=. & rwpvote!=.
estimates store MODEL6, title(Wealth_PCSE)
*MODEL 7
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote lagged_migstock_i_pop  i.year i.ccode if regime==0
estimates store MODEL7, title(Education_PCSE) 
*MODEL 8
qui xtpcse immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth trade_openness_100  years_tertiary_25_i polity_2 sstpy ptaxpy leftgs rwpvote lagged_migstock_i_pop i.year i.ccode if regime==0
estimates store MODEL8, title(Wealth + Education Control_PCSE)
*MODEL 9
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 ln_gdp_pc sstpy ptaxpy leftgs rwpvote lagged_migstock_i_pop i.year i.ccode if regime==0
estimates store MODEL9, title(Education + Wealth Control_PCSE)
*MODEL 10
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality c.ln_gdp_pc#c.inequality ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote lagged_migstock_i_pop i.year i.ccode if regime==0
estimates store MODEL10, title(Both Education and Wealth Interaction Terms_PCSE)
estout MODEL6 MODEL7 MODEL8 MODEL9 MODEL10, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_pcse_output.tex", replace style(tex)

***Appendix
*Summary Statistics
*Table A1: Summary Statistics for Models 1 through 5
sutex immipol ln_gdp_pc years_tertiary_25_i  inequality lagged_ln_population gdp_growth trade_openness_100 polity_2  if year>1946 & year<2007 & regime==0, minmax
*Table A2: Summary Statistics for Models 6 through 10
sutex immipol ln_gdp_pc years_tertiary_25_i  inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote lagged_migstock_i_pop if sstpy!=. & year<2007, minmax

*Correlation Matrix
*Table A3: Correlation Matrix Models 1 through 5
estpost corr immipol ln_gdp_pc years_tertiary_25_i  inequality lagged_ln_population gdp_growth trade_openness_100 polity_2  if year>1946 & year<2007 & regime==0, matrix
esttab . using "correlation_12345.tex", not unstack compress label noobs replace booktabs page
!texify -p -c -b --run-viewer myfile.tex
*Table A4: Correlation Matrix Models 6 through 10
estpost corr immipol ln_gdp_pc years_tertiary_25_i  inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote lagged_migstock_i_pop  if sstpy!=. & year<2007, matrix
esttab . using "correlation_678910.tex", not unstack compress label noobs replace booktabs page
!texify -p -c -b --run-viewer myfile.tex


*Figure A1
*Marginal Effects of Inequality on Immigration Policy from Model 2, Model 4, and Model 5 at Constant Value of years_tertiary_25_i
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0
qui margins, dydx(inequality) at(years_tertiary_25_i=(0(.1)1.8))
marginsplot, xsize(5) ysize(6) addplot(hist years_tertiary_25_i if regime==0 & year>1946 & year<2007, yaxis(2) yscale(range(-.6(.2).8)) yscale(axis(2) range(5 .2) off)lc(white%50) fcolor(gs10%50) xlabel(0(.2)1.8) ylabel(-.6(.2).8)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Years of Tertiary Education, size(6)) title("") ytitle("") legend(off) name(F4M2, replace) graphregion(fcolor(white) lcolor(white))  xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model2.pdf", replace
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode if regime==0
qui margins, dydx(inequality) at(years_tertiary_25_i=(0(.1)1.8))
marginsplot, xsize(5) ysize(6) addplot(hist years_tertiary_25_i if regime==0 & year>1946 & year<2007, yaxis(2) yscale(range(-.6(.2).8)) yscale(axis(2) range(5 .2) off)lc(white%50) fcolor(gs10%50) xlabel(0(.2)1.8) ylabel(-.6(.2).8)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Years of Tertiary Education, size(6)) title("") ytitle("") legend(off) name(F4M4, replace) graphregion(fcolor(white) lcolor(white))  xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model4.pdf", replace
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality c.ln_gdp_pc#c.inequality ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0
qui margins, dydx(inequality) at(years_tertiary_25_i=(0(.1)1.8) ln_gdp_pc=(9.690853))
marginsplot, xsize(5) ysize(6) addplot(hist years_tertiary_25_i if regime==0 & year>1946 & year<2007, yaxis(2) yscale(range(-.6(.2).8)) yscale(axis(2) range(5 .2) off)lc(white%50) fcolor(gs10%50) xlabel(0(.2)1.8) ylabel(-.6(.2).8)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Years of Tertiary Education, size(6)) title("") ytitle("") legend(off) name(F4M5, replace)graphregion(fcolor(white) lcolor(white)) xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model5_education.pdf", replace


*Figure A2
*PCSE Marginal Effects of Inequality on Immigration Policy from Model 6, Model 8, and Model 10 at Constant Values of ln(GDP per capita)
qui xtpcse immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & sstpy!=. & rwpvote!=.
qui margins, dydx(inequality) at(ln_gdp_pc=(7.9(.1)10.5))
marginsplot, xsize(5) ysize(6) addplot(hist ln_gdp_pc if regime==0 & year>1949 & year<2007 & sstpy!=., yaxis(2) yscale(axis(2) range(2 .4) off)lc(white%50) fcolor(gs10%50) xlabel(8(.5)10.5)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Log of GDP per capita, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white))  xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model6.pdf", replace
qui xtpcse immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth trade_openness_100 years_tertiary_25_i polity_2  sstpy ptaxpy leftgs rwpvote lagged_migstock_i_pop  i.year i.ccode if regime==0
qui margins, dydx(inequality) at(ln_gdp_pc=(7.9(.1)10.5))
marginsplot, xsize(5) ysize(6) addplot(hist ln_gdp_pc if regime==0 & year>1949 & year<2007 & sstpy!=. & lagged_migstock_i_pop!=., yaxis(2) yscale(axis(2) range(2 .4) off)lc(white%50) fcolor(gs10%50) xlabel(8(.5)10.5)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Log of GDP per capita, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white))  xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model8.pdf", replace
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality c.ln_gdp_pc#c.inequality ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  lagged_migstock_i_pop i.year i.ccode if regime==0
qui margins, dydx(inequality) at(ln_gdp_pc=(7.9(.1)10.5) years_tertiary_25_i=(.3542859))
marginsplot, xsize(5) ysize(6) addplot(hist ln_gdp_pc if regime==0 & year>1949 & year<2007 & sstpy!=. & lagged_migstock_i_pop!=., yaxis(2) yscale(axis(2) range(2 .4) off)lc(white%50) fcolor(gs10%50) xlabel(8(.5)10.5)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Log of GDP per capita, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white))  xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model10.pdf", replace

*Figure A3
*PCSE Marginal Effects of Inequality on Immigration Policy from Model 7, Model 9, and Model 10 at Constant Value of years_tertiary_25_i
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote lagged_migstock_i_pop  i.year i.ccode if regime==0
qui margins, dydx(inequality) at(years_tertiary_25_i=(0(.1)1.8))
marginsplot, xsize(5) ysize(6) addplot(hist years_tertiary_25_i if regime==0 & year>1949 & year<2007 & sstpy!=. & lagged_migstock_i_pop!=., yaxis(2) yscale(range(-1.5(.3)1)) yscale(axis(2) range(5 .4) off)lc(white%50) fcolor(gs10%50) xlabel(0(.2)1.8) ylabel(-1.5(.3)1)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Years of Tertiary Education, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model7.pdf", replace
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 ln_gdp_pc sstpy ptaxpy leftgs rwpvote lagged_migstock_i_pop i.year i.ccode if regime==0
qui margins, dydx(inequality) at(years_tertiary_25_i=(0(.1)1.8))
marginsplot, xsize(5) ysize(6) addplot(hist years_tertiary_25_i if regime==0 & year>1949 & year<2007 & sstpy!=. & lagged_migstock_i_pop!=., yaxis(2) yscale(range(-1.5(.3)1)) yscale(axis(2) range(5 .4) off)lc(white%50) fcolor(gs10%50) xlabel(0(.2)1.8) ylabel(-1.5(.3)1)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Years of Tertiary Education, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model9.pdf", replace
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality c.ln_gdp_pc#c.inequality ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote lagged_migstock_i_pop i.year i.ccode if regime==0
qui margins, dydx(inequality) at(years_tertiary_25_i=(0(.1)1.8) ln_gdp_pc=(9.528983))
marginsplot, xsize(5) ysize(6) addplot(hist years_tertiary_25_i if regime==0 & year>1949 & year<2007 & sstpy!=. & lagged_migstock_i_pop!=., yaxis(2) yscale(range(-1.5(.3)1)) yscale(axis(2) range(5 .4) off)lc(white%50) fcolor(gs10%50) xlabel(0(.2)1.8) ylabel(-1.5(.3)1)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Years of Tertiary Education, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model10_education.pdf", replace

*Figure A4
*PCSE Marginal Effects of GDP per capita on Immigration Policy from Model 1, Model 3, and Model 5 at Constant Values of Inequality
qui xtpcse immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth polity_2 i.year i.ccode if regime==0
qui margins, dydx(ln_gdp_pc) at(inequality=(0.33(.05)0.83))
marginsplot, xsize(5) ysize(6) addplot(hist inequality if regime==0 & year>1946 & year<2007, yaxis(2) yscale(range(-.2(.1).2)) yscale(axis(2) range(10 .4) off)lc(white%50) fcolor(gs10%50) xlabel(.33(.05).83) ylabel(-.2(.1).2)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Inequality, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model1_gdp_percap.pdf", replace
qui xtpcse immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode if regime==0
qui margins, dydx(ln_gdp_pc) at(inequality=(0.33(.05)0.83))
marginsplot, xsize(5) ysize(6) addplot(hist inequality if regime==0 & year>1946 & year<2007, yaxis(2) yscale(range(-.2(.1).1)) yscale(axis(2) range(10 .4) off)lc(white%50) fcolor(gs10%50) xlabel(.33(.05).83) ylabel(-.2(.1).1)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Inequality, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model3_gdp_percap.pdf", replace
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality c.ln_gdp_pc#c.inequality ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0
qui margins, dydx(ln_gdp_pc) at(inequality=(0.33(.05)0.83) years_tertiary_25_i=(.425177))
marginsplot, xsize(5) ysize(6) addplot(hist inequality if regime==0 & year>1946 & year<2007, yaxis(2) yscale(range(-.3(.1).2)) yscale(axis(2) range(10 .4) off)lc(white%50) fcolor(gs10%50) xlabel(.33(.05).83) ylabel(-.3(.1).2)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Inequality, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model5_gdp_percap.pdf", replace

*Figure A5
*PCSE Marginal Effects of GDP per capita on Immigration Policy from Model 6, Model 8, and Model 10 at Constant Values of Inequality
qui xtpcse immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth polity_2 i.year i.ccode if regime==0
qui margins, dydx(ln_gdp_pc) at(inequality=(0.33(.05)0.83))
marginsplot, xsize(5) ysize(6) addplot(hist inequality if regime==0 & year>1946 & year<2007 & sstpy!=., yaxis(2) xscale(range(.33(.05).83)) yscale(range(-.2(.1).2)) yscale(axis(2) range(10 .2) off)lc(white%50) fcolor(gs10%50) xlabel(.33(.05).83) ylabel(-.2(.1).2)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Inequality, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model6_gdp_percap.pdf", replace
qui xtpcse immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i sstpy ptaxpy leftgs rwpvote lagged_migstock_i_pop i.year i.ccode if regime==0
qui margins, dydx(ln_gdp_pc) at(inequality=(0.33(.05)0.83))
marginsplot, xsize(5) ysize(6) addplot(hist inequality if regime==0 & year>1946 & year<2007 & sstpy!=. & lagged_migstock_i_pop!=., yaxis(2) yscale(range(-.3(.1).2)) yscale(axis(2) range(10 .4) off)lc(white%50) fcolor(gs10%50) xlabel(.33(.05).83) ylabel(-.3(.1).2)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Inequality, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model8_gdp_percap.pdf", replace
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality c.ln_gdp_pc#c.inequality ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote lagged_migstock_i_pop i.year i.ccode if regime==0
qui margins, dydx(ln_gdp_pc) at(inequality=(0.33(.05)0.83) years_tertiary_25_i=(.425177))
marginsplot, xsize(5) ysize(6) addplot(hist inequality if regime==0 & year>1946 & year<2007 & sstpy!=. & lagged_migstock_i_pop!=., yaxis(2) yscale(range(-.3(.1).2)) yscale(axis(2) range(10 .4) off)lc(white%50) fcolor(gs10%50) xlabel(.33(.05).83) ylabel(-.3(.1).2)) recast(line) recastci(rarea) ciopts(fc(emidblue%50) lc(white)) yline(0) xtitle(Inequality, size(6)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) xlabel(, labsize(5)) ylabel(, labsize(5))
graph export "me_model10_gdp_percap.pdf", replace

*Figure A6
list ccode year if ln_gdp_pc>10
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==2 & year>=1978, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(US, replace)   ////
	xtitle("Year", size(6)) ytitle("", axis(1)) ytitle("Inequality", axis(2) size(6)) title("US", size(8)) xscale(range(1975 2010)) xlabel(1975(10)2010)
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==20 & year>=1988, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(CAN, replace)   ////
	xtitle("") ytitle("", axis(1)) ytitle("", axis(2)) title("Canada", size(8)) xscale(range(1985 2010)) xlabel(1985(10)2010)
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==200 & year>=1997, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(UK, replace)   ////
	xtitle("Year", size(6)) ytitle("", axis(1)) ytitle("", axis(2)) title("UK", size(8))  xscale(range(1995 2010)) xlabel(1995(5)2010)
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==205 & year>=1999 & year<=2010, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(IRE, replace)   ////
	xtitle("") ytitle("", axis(1)) ytitle("", axis(2)) title("Ireland", size(8)) xscale(range(1995 2010)) xlabel(1995(5)2010)
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==210 & year>=1995, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(NET, replace)   ////
	xtitle("") ytitle("", axis(1)) ytitle("Inequality", axis(2) size(6)) title("Netherlands", size(8)) xscale(range(1995 2010)) xlabel(1995(5)2010)
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==211 & year>=1996 & year<=2010, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(BEL, replace)   ////
	xtitle("") ytitle("", axis(1)) ytitle("", axis(2)) title("Belgium", size(8)) xscale(range(1995 2015)) xlabel(1995(5)2015) 
	twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==220 & year>=1995, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(FRA, replace)  ////
	xtitle("") ytitle("Immigration Policy", axis(1) size(6)) ytitle("", axis(2)) title("France", size(8))  xscale(range(1995 2010)) xlabel(1995(5)2010) 
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==225 & year>=1999, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(CHE, replace)   ////
	xtitle("Year", size(6)) ytitle("", axis(1)) ytitle("", axis(2)) title("Switzerland", size(8)) xscale(range(1995 2010)) xlabel(1995(5)2010)
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==255 & year>=1991, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(DEU, replace)   ////
	xtitle("") ytitle("", axis(1)) ytitle("", axis(2)) title("Germany", size(8)) xscale(range(1990 2010)) xlabel(1990(10)2010)	
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==305 & year>=1990 & year<=2015, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(ATR, replace)   ////
	xtitle("") ytitle("", axis(1)) ytitle("", axis(2)) title("Austria", size(8))  xscale(range(1990 2015)) xlabel(1990(10)2015)
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==380 & year>=1997 & year<=2015, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(SWE, replace)   ////
	xtitle("Year", size(6)) ytitle("", axis(1)) ytitle("", axis(2)) title("Sweden", size(8)) xscale(range(1995 2015)) xlabel(1995(5)2015)
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==385 & year>=1985 & year<=2015, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(NOR, replace)   ////
	xtitle("Year", size(6)) ytitle("Immigration Policy", axis(1) size(6)) ytitle("", axis(2)) title("Norway", size(8)) xscale(range(1985 2010)) xlabel(1985(10)2015)
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==390 & year>=1985 & year<=2015, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(DEN, replace)   ////
	xtitle("") ytitle("", axis(1)) ytitle("Inequality", axis(2) size(6)) title("Denmark", size(8)) xscale(range(1985 2015)) xlabel(1985(10)2015)
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==740 & year>=1991, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(JPN, replace)   ////
	xtitle("") ytitle("", axis(1)) ytitle("", axis(2)) title("Japan", size(8)) xscale(range(1990 2010)) xlabel(1990(10)2010)
twoway (line immipol year, lcolor(black)) (line inequality year, yaxis(2) lpattern(dash) lcolor(black)) if ccode==900 & year>=1995, ////
graphregion(margin(small) fcolor(white) lcolor(white)) legend(off) name(AUS, replace) ////
	xtitle("") ytitle("Immigration Policy", axis(1) size(6)) ytitle("", axis(2)) title("Australia", size(8)) xscale(range(1990 2010)) xlabel(1995(5)2010)
graph combine AUS ATR BEL CAN DEN ////
FRA DEU IRE JPN NET ////
NOR SWE CHE UK US, cols(5) xsize(10) ysize(6) graphregion(margin(small) fcolor(white) lcolor(white))	
graph export "Graph_allwealthy.pdf", replace

*Table A5
*Immigration Policy and Inequality (OLS with PCSE and Country-Specific Time Trends)
qui xtpcse immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0
estimates store MODELA1, title(Wealth) 
qui xtpcse  immipol lagged_immipol  c.years_tertiary_25_i##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0
estimates store MODELA2, title(Education) 
qui xtpcse  immipol lagged_immipol  c.ln_gdp_pc##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode i.ccode#c.time  if regime==0
estimates store MODELA3, title(Wealth + Education Control)
qui xtpcse immipol lagged_immipol  c.years_tertiary_25_i##c.inequality lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode i.ccode#c.time  if regime==0
estimates store MODELA4, title(Education + Wealth Control)
qui xtpcse  immipol lagged_immipol  c.years_tertiary_25_i##c.inequality c.ln_gdp_pc#c.inequality ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time  if regime==0
estimates store MODELA5, title(Both Education and Wealth Interaction Terms)
estout MODELA1 MODELA2 MODELA3 MODELA4 MODELA5, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_appendix_output.tex", replace style(tex)

*Table A6
*Immigration Policy and Inequality (OLS with Country-Specific Times Trends with Lagged IVs)
qui xtpcse forward_immipol immipol  c.ln_gdp_pc##c.inequality ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0
estimates store MODELA6, title(Wealth) 
qui xtpcse forward_immipol immipol  c.years_tertiary_25_i##c.inequality ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0
estimates store MODELA7, title(Education)
qui xtpcse forward_immipol immipol  c.ln_gdp_pc##c.inequality ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode i.ccode#c.time if regime==0
estimates store MODELA8, title(Wealth + Education Control)
qui xtpcse forward_immipol immipol  c.years_tertiary_25_i##c.inequality ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode i.ccode#c.time  if regime==0
estimates store MODELA9, title(Education + Wealth Control)
qui xtpcse forward_immipol immipol  c.years_tertiary_25_i##c.inequality c.ln_gdp_pc#c.inequality ln_gdp_pc ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0
estimates store MODELA10, title(Both Education and Wealth Interaction Terms)
estout MODELA6 MODELA7 MODELA8 MODELA9 MODELA10, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_all_ivs_lagged_appendix_output.tex", replace style(tex)

*Table A7: Inequality, Development, and Immgiration Policy in Autocracies (We cannot use PCSE because time periods are not common.)
qui xtreg immipol lagged_immipol  ln_gdp_pc inequality lagged_ln_population gdp_growth  polity_2 i.year if regime==1 & year>1945, fe robust dfadj
estimates store MODELA11, title(Autocracies) 
qui xtreg immipol lagged_immipol  ln_gdp_pc  lagged_ln_population gdp_growth  i.year if regime!=0 & year>1945 & country!="Japan", fe robust dfadj
estimates store MODELA12, title(Autocracies) 
qui xtreg immipol lagged_immipol  ln_gdp_pc inequality lagged_ln_population gdp_growth  polity_2 i.year i.ccode if regime==1, cluster(ccode)
estimates store MODELA13, title(Autocracies) 
qui xtreg immipol lagged_immipol  ln_gdp_pc inequality lagged_ln_population gdp_growth  polity_2 i.year i.ccode i.ccode#c.time if regime==1
estimates store MODELA14, title(Autocracies) 
estout MODELA11 MODELA12 MODELA13 MODELA14, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_autocracies_output.tex", replace style(tex)


*Table A9: Top 10% Income Share, Development, and Immigration Policy since World War II (OLS)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top10peris lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA15, title(Wealth) 
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10peris lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA16, title(Education) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top10peris lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA17, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10peris lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA18, title(Education + Wealth Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10peris c.ln_gdp_pc#c.top10peris ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA19, title(Both Education and Wealth Interaction Terms)
estout MODELA15 MODELA16 MODELA17 MODELA18 MODELA19, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_top10peris.tex", replace style(tex)


*Table A10: Top 10% Income Share, Development, and Immigration Policy (1950-2006 with Taxation Data, OLS)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top10peris lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & sstpy!=. & rwpvote!=.,cluster(ccode)
estimates store MODELA20, title(Wealth_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10peris lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA21, title(Education_PCSE) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top10peris lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA22, title(Wealth + Education Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10peris lagged_ln_population gdp_growth trade_openness_100 polity_2 ln_gdp_pc sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA23, title(Education + Wealth Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10peris c.ln_gdp_pc#c.top10peris ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA24, title(Both Education and Wealth Interaction Terms_PCSE)
estout MODELA20 MODELA21 MODELA22 MODELA23 MODELA24, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_pcse_top10peris.tex", replace style(tex)

*Table A11: Top 10% Income Share, Development and Immigration Policy (OLS with PCSE and Country-Specific Time Trends)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top10peris lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA25, title(Wealth) 
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.top10peris lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0
estimates store MODELA26, title(Education) 
qui xtreg  immipol lagged_immipol  c.ln_gdp_pc##c.top10peris lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA27, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10peris lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA28, title(Education + Wealth Control)
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.top10peris c.ln_gdp_pc#c.top10peris ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA29, title(Both Education and Wealth Interaction Terms)
estout MODELA25 MODELA26 MODELA27 MODELA28 MODELA29, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_appendix_top10peris.tex", replace style(tex)

*Table A12: Top 10% Income Share, Development, and Immigration Policy in Autocracies (OLS, we cannot use PCSE because time periods are not common)
qui xtreg immipol lagged_immipol  ln_gdp_pc top10peris lagged_ln_population gdp_growth  polity_2 i.year if regime==1 & year>1945, fe robust dfadj
estimates store MODELA30, title(Autocracies) 
qui xtreg immipol lagged_immipol  ln_gdp_pc  lagged_ln_population gdp_growth  i.year if regime!=0 & year>1945 & country!="Japan", fe robust dfadj
estimates store MODELA31, title(Autocracies) 
***Autocracies*** while forcing to use PCSE.
qui xtreg immipol lagged_immipol  ln_gdp_pc top10peris lagged_ln_population gdp_growth  polity_2 i.year i.ccode if regime==1, cluster(ccode)
estimates store MODELA32, title(Autocracies) 
qui xtreg immipol lagged_immipol  ln_gdp_pc top10peris lagged_ln_population gdp_growth  polity_2 i.year i.ccode i.ccode#c.time if regime==1, cluster(ccode)
estimates store MODELA33, title(Autocracies) 
estout MODELA30 MODELA31 MODELA32 MODELA33, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_autocracies_top10peris.tex", replace style(tex)

*Table A13: Top 5% Income Share, Development, and Immigration Policy Since World War II (PCSE 1947 -- 2006) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top5is lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA34, title(Wealth) 
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top5is lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA35, title(Education) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top5is lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA36, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top5is lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA37, title(Education + Wealth Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top5is c.ln_gdp_pc#c.top5is ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA38, title(Both Education and Wealth Interaction Terms)
estout MODELA34 MODELA35 MODELA36 MODELA37 MODELA38, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_top5is.tex", replace style(tex)

*Table A14: Top 5% Income Share, Development, and Immigration Policy and Inequality (1950-2006 with Taxation Data)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top5is lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & sstpy!=. & rwpvote!=.,cluster(ccode)
estimates store MODELA39, title(Wealth_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top5is lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA40, title(Education_PCSE) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top5is lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0
estimates store MODELA41, title(Wealth + Education Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top5is lagged_ln_population gdp_growth trade_openness_100 polity_2 ln_gdp_pc sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA42, title(Education + Wealth Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top5is c.ln_gdp_pc#c.top5is ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA43, title(Both Education and Wealth Interaction Terms_PCSE)
estout MODELA39 MODELA40 MODELA41 MODELA42 MODELA43, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_pcse_top5is.tex", replace style(tex)

*Table A15: Top 5% Income Share, Development and Immigration Policy with Country-Specific Time Trends (OLS with PCSE and Country-Specific Time Trends)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top5is lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA44, title(Wealth) 
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.top5is lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA45, title(Education) 
qui xtreg  immipol lagged_immipol  c.ln_gdp_pc##c.top5is lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA46, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top5is lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA47, title(Education + Wealth Control)
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.top5is c.ln_gdp_pc#c.top5is ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA48, title(Both Education and Wealth Interaction Terms)
estout MODELA44 MODELA45 MODELA46 MODELA47 MODELA48, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_appendix_top5is.tex", replace style(tex)

*Table A16: Top 5% Income Share, Development, and Immigration Policy in Autocracies (We cannot use PCSE because time periods are not common.)
qui xtreg immipol lagged_immipol  ln_gdp_pc top5is lagged_ln_population gdp_growth  polity_2 i.year if regime==1 & year>1945, fe robust dfadj
estimates store MODELA49, title(Autocracies) 
qui xtreg immipol lagged_immipol  ln_gdp_pc  lagged_ln_population gdp_growth  i.year if regime!=0 & year>1945 & country!="Japan", fe robust dfadj
estimates store MODELA50, title(Autocracies) 
***Autocracies*** while forcing to use PCSE.
qui xtreg immipol lagged_immipol  ln_gdp_pc top5is lagged_ln_population gdp_growth  polity_2 i.year i.ccode if regime==1, cluster(ccode)
estimates store MODELA51, title(Autocracies) 
qui xtreg immipol lagged_immipol  ln_gdp_pc top5is lagged_ln_population gdp_growth  polity_2 i.year i.ccode i.ccode#c.time if regime==1, cluster(ccode)
estimates store MODELA52, title(Autocracies) 
estout MODELA49 MODELA50 MODELA51 MODELA52, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_autocracies_top5is.tex", replace style(tex)

*Table A17: Top 1% Income Share, Development and Immigration Policy since World War II (PCSE 1947 -- 2006)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top1is lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA53, title(Wealth) 
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1is lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA54, title(Education) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top1is lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA55, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1is lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA56, title(Education + Wealth Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1is c.ln_gdp_pc#c.top1is ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA57, title(Both Education and Wealth Interaction Terms)
estout MODELA53 MODELA54 MODELA55 MODELA56 MODELA57, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_top1is.tex", replace style(tex)

*Table A18: Top 1% Income Share, Development, and Immigration Policy (1950-2006 with Taxation Data)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top1is lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & sstpy!=. & rwpvote!=.,cluster(ccode)
estimates store MODELA58, title(Wealth_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1is lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA59, title(Education_PCSE) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top1is lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA60, title(Wealth + Education Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1is lagged_ln_population gdp_growth trade_openness_100 polity_2 ln_gdp_pc sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA61, title(Education + Wealth Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1is c.ln_gdp_pc#c.top1is ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA62, title(Both Education and Wealth Interaction Terms_PCSE)
estout MODELA58 MODELA59 MODELA60 MODELA61 MODELA62, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_pcse_top1is.tex", replace style(tex)

*Table A19: Inequality, Development, and Immigration Policy with Country-Specific Time Trends (OLS with PCSE and Country-Specific Time Trends)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top1is lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA63, title(Wealth) 
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.top1is lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA64, title(Education) 
qui xtreg  immipol lagged_immipol  c.ln_gdp_pc##c.top1is lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA65, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1is lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA66, title(Education + Wealth Control)
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.top1is c.ln_gdp_pc#c.top1is ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA67, title(Both Education and Wealth Interaction Terms)
estout MODELA63 MODELA64 MODELA65 MODELA66 MODELA67, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_appendix_top1is.tex", replace style(tex)

*Table A20:Top 1% Income Share, Development, and Immigration Policy in Autocracies 
***Autocracies*** We cannot use PCSE because time periods are not common.
qui xtreg immipol lagged_immipol  ln_gdp_pc top1is lagged_ln_population gdp_growth  polity_2 i.year if regime==1 & year>1945, fe robust dfadj
estimates store MODELA68, title(Autocracies) 
qui xtreg immipol lagged_immipol  ln_gdp_pc  lagged_ln_population gdp_growth  i.year if regime!=0 & year>1945 & country!="Japan", fe robust dfadj
estimates store MODELA69, title(Autocracies) 
***Autocracies*** while forcing to use PCSE.
qui xtreg immipol lagged_immipol  ln_gdp_pc top1is lagged_ln_population gdp_growth  polity_2 i.year i.ccode if regime==1, cluster(ccode)
estimates store MODELA70, title(Autocracies) 
qui xtreg immipol lagged_immipol  ln_gdp_pc top1is lagged_ln_population gdp_growth  polity_2 i.year i.ccode i.ccode#c.time if regime==1, cluster(ccode)
estimates store MODELA71, title(Autocracies) 
estout MODELA68 MODELA69 MODELA70 MODELA71, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_autocracies_top1is.tex", replace style(tex)

*Table A21: Gini Coefficient, Development, and Immigration Policy since World War II (PCSE 1947 -- 2006)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.gini lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA72, title(Wealth) 
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.gini lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA73, title(Education) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.gini lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA74, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.gini lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA75, title(Education + Wealth Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.gini c.ln_gdp_pc#c.gini ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA76, title(Both Education and Wealth Interaction Terms)
estout MODELA72 MODELA73 MODELA74 MODELA75 MODELA76, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_gini.tex", replace style(tex)

*Table A22: Gini Coefficient, Development, and Immigration Policy (1950-2006 with Taxation Data)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.gini lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & sstpy!=. & rwpvote!=.,cluster(ccode)
estimates store MODELA77, title(Wealth_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.gini lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA78, title(Education_PCSE) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.gini lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA79, title(Wealth + Education Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.gini lagged_ln_population gdp_growth trade_openness_100 polity_2 ln_gdp_pc sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA80, title(Education + Wealth Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.gini c.ln_gdp_pc#c.gini ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA81, title(Both Education and Wealth Interaction Terms_PCSE)
estout MODELA77 MODELA78 MODELA79 MODELA80 MODELA81, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_pcse_gini.tex", replace style(tex)

*Table A23: Gini Coefficient, Development and Immigration Policy with Country-Specific Time Trends (OLS with PCSE and Country-Specific Time Trends)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.gini lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA82, title(Wealth) 
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.gini lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA83, title(Education) 
qui xtreg  immipol lagged_immipol  c.ln_gdp_pc##c.gini lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA84, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.gini lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA85, title(Education + Wealth Control)
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.gini c.ln_gdp_pc#c.gini ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA86, title(Both Education and Wealth Interaction Terms)
estout MODELA82 MODELA83 MODELA84 MODELA85 MODELA86, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_appendix_gini.tex", replace style(tex)

*Table A24: Gini Coefficient, Development, and Immigration Policy in Autocracies (We cannot use PCSE because time periods are not common.)
qui xtreg immipol lagged_immipol  ln_gdp_pc gini lagged_ln_population gdp_growth  polity_2 i.year if regime==1 & year>1945, fe robust dfadj
estimates store MODELA87, title(Autocracies) 
qui xtreg immipol lagged_immipol  ln_gdp_pc  lagged_ln_population gdp_growth  i.year if regime!=0 & year>1945 & country!="Japan", fe robust dfadj
estimates store MODELA88, title(Autocracies) 
***Autocracies*** while forcing to use PCSE.
qui xtreg immipol lagged_immipol  ln_gdp_pc gini lagged_ln_population gdp_growth  polity_2 i.year i.ccode if regime==1, cluster(ccode)
estimates store MODELA89, title(Autocracies) 
qui xtreg immipol lagged_immipol  ln_gdp_pc gini lagged_ln_population gdp_growth  polity_2 i.year i.ccode i.ccode#c.time if regime==1, cluster(ccode)
estimates store MODELA90, title(Autocracies) 
estout MODELA87 MODELA88 MODELA89 MODELA90, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_autocracies_gini.tex", replace style(tex)

*Table A25: Top 1% Wealth Share, Development, and Immigration Policy since World War II (PCSE 1947 -- 2006)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top1ws lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA91, title(Wealth) 
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1ws lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA92, title(Education) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top1ws lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA93, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1ws lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA94, title(Education + Wealth Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1ws c.ln_gdp_pc#c.top1ws ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA95, title(Both Education and Wealth Interaction Terms)
estout MODELA91 MODELA92 MODELA93 MODELA94 MODELA95, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_top1ws.tex", replace style(tex)

*Table A26: Top 1% Wealth Share, Development, and Immigration Policy (1950-2006 with Taxation Data)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top1ws lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & sstpy!=. & rwpvote!=.,cluster(ccode)
estimates store MODELA96, title(Wealth_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1ws lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA97, title(Education_PCSE) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top1ws lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA98, title(Wealth + Education Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1ws lagged_ln_population gdp_growth trade_openness_100 polity_2 ln_gdp_pc sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA99, title(Education + Wealth Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1ws c.ln_gdp_pc#c.top1ws ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA100, title(Both Education and Wealth Interaction Terms_PCSE)
estout MODELA96 MODELA97 MODELA98 MODELA99 MODELA100, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_pcse_top1ws.tex", replace style(tex)

*Table A27: Top 1% Wealth Share, Development, and Immigration Policy with Country-Specific Time Trends (OLS with PCSE and Country-Specific Time Trends)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top1ws lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA101, title(Wealth) 
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.top1ws lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA102, title(Education) 
qui xtreg  immipol lagged_immipol  c.ln_gdp_pc##c.top1ws lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA103, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top1ws lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA104, title(Education + Wealth Control)
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.top1ws c.ln_gdp_pc#c.top1ws ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA105, title(Both Education and Wealth Interaction Terms)
estout MODELA101 MODELA102 MODELA103 MODELA104 MODELA105, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_appendix_top1ws.tex", replace style(tex)

*Table A28: Top 10% Wealth Share, Development, and Immigration Policy since World War II (PCSE 1947 -- 2006)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA106, title(Wealth) 
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA107, title(Education) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA108, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA109, title(Education + Wealth Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10ws c.ln_gdp_pc#c.top10ws ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA110, title(Both Education and Wealth Interaction Terms)
estout MODELA106 MODELA107 MODELA108 MODELA109 MODELA110, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_top10ws.tex", replace style(tex)

*Table A29: Top 10% Wealth Share, Development, and Immigration Policy (1950-2006 with Taxation Data)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & sstpy!=. & rwpvote!=.,cluster(ccode)
estimates store MODELA111, title(Wealth_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA112, title(Education_PCSE) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA113, title(Wealth + Education Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 ln_gdp_pc sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA114, title(Education + Wealth Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10ws c.ln_gdp_pc#c.top10ws ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA115, title(Both Education and Wealth Interaction Terms_PCSE)
estout MODELA111 MODELA112 MODELA113 MODELA114 MODELA115, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_pcse_top10ws.tex", replace style(tex)

*Table A30: Top 10% Wealth Share, Development, and Immigration Policy with Country-Specific Time Trends (OLS with PCSE and Country-Specific Time Trends)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA116, title(Wealth) 
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA117, title(Education) 
qui xtreg  immipol lagged_immipol  c.ln_gdp_pc##c.top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA118, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA119, title(Education + Wealth Control)
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.top10ws c.ln_gdp_pc#c.top10ws ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA120, title(Both Education and Wealth Interaction Terms)
estout MODELA116 MODELA117 MODELA118 MODELA119 MODELA120, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_appendix_top10ws.tex", replace style(tex)

*Table A31: Top Income Tax,Development, and Immigration Policy since World War II (PCSE 1947 -- 2006)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top_incrate_n lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA121, title(Wealth) 
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top_incrate_n lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA122, title(Education) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top_incrate_n lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA123, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top_incrate_n lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA124, title(Education + Wealth Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top_incrate_n c.ln_gdp_pc#c.top_incrate_n ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA125, title(Both Education and Wealth Interaction Terms)
estout MODELA121 MODELA122 MODELA123 MODELA124 MODELA125, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_top_incrate_n.tex", replace style(tex)

*Table A32: Top Income Tax, Development, and Immigration Policy (1950-2006 with Taxation Data)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top_incrate_n lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & sstpy!=. & rwpvote!=.
estimates store MODELA126, title(Wealth_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top_incrate_n lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0
estimates store MODELA127, title(Education_PCSE) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top_incrate_n lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0
estimates store MODELA128, title(Wealth + Education Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top_incrate_n lagged_ln_population gdp_growth trade_openness_100 polity_2 ln_gdp_pc sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0
estimates store MODELA129, title(Education + Wealth Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top_incrate_n c.ln_gdp_pc#c.top_incrate_n ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0
estimates store MODELA130, title(Both Education and Wealth Interaction Terms_PCSE)
estout MODELA126 MODELA127 MODELA128 MODELA129 MODELA130, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_pcse_top_incrate_n.tex", replace style(tex)

*Table A33: Top Income Tax, Development, and Immigration Policy with Country-Specific Time Trends (OLS with PCSE and Country-Specific Time Trends)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.top_incrate_n lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA131, title(Wealth) 
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.top_incrate_n lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA132, title(Education) 
qui xtreg  immipol lagged_immipol  c.ln_gdp_pc##c.top_incrate_n lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA133, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.top_incrate_n lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA134, title(Education + Wealth Control)
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.top_incrate_n c.ln_gdp_pc#c.top_incrate_n ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA135, title(Both Education and Wealth Interaction Terms)
estout MODELA131 MODELA132 MODELA133 MODELA134 MODELA135, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_appendix_top_incrate_n.tex", replace style(tex)


*Table A34: Top Inheritance Tax, Development, and Immigration Policy since World War II (PCSE 1947 -- 2006)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.topitaxrate2 lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA136, title(Wealth) 
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.topitaxrate2 lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA137, title(Education) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.topitaxrate2 lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA138, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.topitaxrate2 lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA139, title(Education + Wealth Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.topitaxrate2 c.ln_gdp_pc#c.topitaxrate2 ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA140, title(Both Education and Wealth Interaction Terms)
estout MODELA136 MODELA137 MODELA138 MODELA139 MODELA140, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_topitaxrate2.tex", replace style(tex)

*Table A35: Top Inheritance Tax, Development, and Immigration Policy (1950-2006 with Taxation Data)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.topitaxrate2 lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & sstpy!=. & rwpvote!=.,cluster(ccode)
estimates store MODELA141, title(Wealth_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.topitaxrate2 lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA142, title(Education_PCSE) 
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.topitaxrate2 lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA143, title(Wealth + Education Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.topitaxrate2 lagged_ln_population gdp_growth trade_openness_100 polity_2 ln_gdp_pc sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA144, title(Education + Wealth Control_PCSE)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.topitaxrate2 c.ln_gdp_pc#c.topitaxrate2 ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 sstpy ptaxpy leftgs rwpvote  i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA145, title(Both Education and Wealth Interaction Terms_PCSE)
estout MODELA141 MODELA142 MODELA143 MODELA144 MODELA145, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_pcse_topitaxrate2.tex", replace style(tex)

*Table A36: Top Inheritance Tax, Development, and Immigration Policy with Country-Specific Time Trends (OLS with PCSE and Country-Specific Time Trends)
qui xtreg immipol lagged_immipol  c.ln_gdp_pc##c.topitaxrate2 lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0,cluster(ccode)
estimates store MODELA146, title(Wealth) 
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.topitaxrate2 lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time if regime==0
estimates store MODELA147, title(Education) 
qui xtreg  immipol lagged_immipol  c.ln_gdp_pc##c.topitaxrate2 lagged_ln_population gdp_growth trade_openness_100 polity_2 years_tertiary_25_i i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA148, title(Wealth + Education Control)
qui xtreg immipol lagged_immipol  c.years_tertiary_25_i##c.topitaxrate2 lagged_ln_population gdp_growth trade_openness_100 polity_2  ln_gdp_pc i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA149, title(Education + Wealth Control)
qui xtreg  immipol lagged_immipol  c.years_tertiary_25_i##c.topitaxrate2 c.ln_gdp_pc#c.topitaxrate2 ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode i.ccode#c.time  if regime==0,cluster(ccode)
estimates store MODELA150, title(Both Education and Wealth Interaction Terms)
estout MODELA146 MODELA147 MODELA148 MODELA149 MODELA150, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_appendix_topitaxrate2.tex", replace style(tex)

*Table A37: Inequality and Immigration Policy since 1740 
qui xtreg immipol lagged_immipol inequality ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA151, title(inequality) 
qui xtreg immipol lagged_immipol top10peris ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA152, title(top10peris) 
qui xtreg immipol lagged_immipol top5is ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA153, title(top5is) 
qui xtreg immipol lagged_immipol top1is ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA154, title(top1is)
estout MODELA151 MODELA152 MODELA153 MODELA154, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_uninteracted_allyears1.tex", replace style(tex)

*Table A38: Inequality and Immigration Policy since 1740 
qui xtreg immipol lagged_immipol gini ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA155, title(gini) 
qui xtreg immipol lagged_immipol top1ws ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA156, title(top1ws) 
qui xtreg immipol lagged_immipol top10ws ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0,cluster(ccode)
estimates store MODELA157, title(top10ws)
estout MODELA155 MODELA156 MODELA157, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_uninteracted_allyears2.tex", replace style(tex)

*Table A39: Inequality and Immigration Policy since World War II
qui xtreg immipol lagged_immipol inequality ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & year>1945,cluster(ccode)
estimates store MODELA158, title(inequality2) 
qui xtreg immipol lagged_immipol top10peris ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & year>1945,cluster(ccode)
estimates store MODELA159, title(top10peris2) 
qui xtreg immipol lagged_immipol top5is ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & year>1945,cluster(ccode)
estimates store MODELA160, title(top5is2) 
qui xtreg immipol lagged_immipol top1is ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & year>1945,cluster(ccode)
estimates store MODELA161, title(top1is2) 
estout MODELA158 MODELA159 MODELA160 MODELA161, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_uninteracted_post19451.tex", replace style(tex)

*Table A40: Inequality and Immigration Policy since World War II
qui xtreg immipol lagged_immipol gini ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & year>1945,cluster(ccode)
estimates store MODELA161, title(gini2) 
qui xtreg immipol lagged_immipol top1ws ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & year>1945,cluster(ccode)
estimates store MODELA162, title(top1ws2) 
qui xtreg immipol lagged_immipol top10ws ln_gdp_pc lagged_ln_population gdp_growth trade_openness_100 polity_2 i.year i.ccode if regime==0 & year>1945,cluster(ccode)
estimates store MODELA163, title(top10ws2)
estout MODELA161 MODELA162 MODELA163, cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "immipol_robust_uninteracted_post19452.tex", replace style(tex)

*Table A41: Summary Statistics for Tables A38-A39
sutex immipol ln_gdp_pc inequality top10peris top5is top1is gini top1ws top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 if regime==0, minmax

*Table A42: Summary Statistics for Tables A40-A41
sutex immipol ln_gdp_pc inequality top10peris top5is top1is gini top1ws top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 if regime==0 & year>1945, minmax

*Table 43: Correlation Matrix (Tables A37-A38)
estpost corr immipol ln_gdp_pc inequality top10peris top5is top1is gini top1ws top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2  if regime==0, matrix
esttab . using "correlation_robustness_allyears.tex", not unstack compress label noobs replace booktabs page
!texify -p -c -b --run-viewer myfile.tex

*Table 44: Correlation Matrix (Tables A39-A40)
estpost corr immipol ln_gdp_pc inequality top10peris top5is top1is gini top1ws top10ws lagged_ln_population gdp_growth trade_openness_100 polity_2 if year>1946 & year<2007 & regime==0, matrix
esttab . using "correlation_robustness_post1945.tex", not unstack compress label noobs replace booktabs page
!texify -p -c -b --run-viewer myfile.tex
